package com.atguigu.gmall.cart.client;

import com.atguigu.gmall.model.cart.CartInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;

import javax.servlet.http.HttpServletRequest;
import java.util.List;

/**
 * @author: 李旭
 * @create: 2021-09-07 15:27
 **/
@FeignClient(name = "service-cart")
public interface CartInfoFeignClient {

    //加入购物车
    @PostMapping("/api/cart/addCart/{skuId}/{skuNum}")
    public void addCart(@PathVariable Long skuId, @PathVariable Integer skuNum);
    @GetMapping("/api/cart/findCartInfo/{skuId}")
    public CartInfo findCartInfo(@PathVariable Long skuId);

    //查询购物车中已经选中了商品
    @GetMapping("/api/cart/findCartInfoListByIsChecked")
    public List<CartInfo> findCartInfoListByIsChecked();
}
